﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GrayParrot.Web.Formly;

namespace FimetContoDeposito.BLL.Metadata
{
    public class AnagraficaDocumentiMetadataCaricoSearch
    {
        [FieldGroup(GroupName = "primo", Row = 1, Index = 1, NumberOfColumns = 4)]
        [FormFieldAttribute(Type = FormFieldTypes.GrayParrotDateTimePicker)]
        [GrayParrotDateTimePickerOptionsAttribute(Label = "Data Movimento",
                                 Placeholder = "Indicare la data del movimento...",
                                 Required = false,
                                 MinuteStep = 10,
                                 Language = "it",
                                 Format = "dd/mm/yyyy hh:ii",
                                 WithInitialDate = false,
                                 ShowMeridian = false)]
        public DateTime DataMovimento { get; set; }

        [FieldGroup(GroupName = "primo", Row = 1, Index = 2, NumberOfColumns = 4)]
        [FormFieldAttribute(Type = FormFieldTypes.Select)]
        [SelectTemplateOptions(Label = "Magazzino",
                               Placeholder = "Indicare il Cliente a cui fa capo il documento...",
                               Required = false,
                               Callback = "/api/Common/LoadCustomers", ForceLoad = true)]
        public Guid Customer { get; set; }

        [FieldGroup(GroupName = "primo", Row = 1, Index = 3, NumberOfColumns = 4)]
        [FormFieldAttribute(Type = FormFieldTypes.Select)]
        [SelectTemplateOptions(Label = "Fornitore",
                               Placeholder = "Indicare il Fornitore dell'articolo...",
                               Required = false,
                               Callback = "/api/Common/LoadFornitori", ForceLoad = true)]
        public Guid Fornitore { get; set; }

        /**/
        [FieldGroup(GroupName = "secondo", Row = 2, Index = 1, NumberOfColumns = 4)]
        [FormFieldAttribute(Type = FormFieldTypes.Select)]
        [SelectTemplateOptions(Label = "Tipo Doc.",
                               Placeholder = "Indicare il tipo di documento...",
                               Required = false,
                               Callback = "/api/Common/LoadTipoDocumento", ForceLoad = true)]
        public Guid TipoDocumento { get; set; }

        [FieldGroup(GroupName = "secondo", Row = 2, Index = 2, NumberOfColumns = 4)]
        [FormFieldAttribute(Type = FormFieldTypes.Input)]
        [TextTemplateOptionsAttribute(Label = "Numero Doc.",
            Placeholder = "Max 50 car.",
            Required = false,
            MinLength = 0,
            MaxLength = 50)]
        public string NumeroDocumento { get; set; }

        [FieldGroup(GroupName = "secondo", Row = 2, Index = 3, NumberOfColumns = 4)]
        [FormFieldAttribute(Type = FormFieldTypes.GrayParrotDateTimePicker)]
        [GrayParrotDateTimePickerOptionsAttribute(Label = "Data Doc.",
                                 Placeholder = "Indicare la data del documento...",
                                 Required = false,
                                 MinuteStep = 10,
                                 Format = "dd/mm/yyyy",
                                 ShowTimePanel = false,
                                 WithInitialDate = false)]
        public DateTime DataDocumento { get; set; }
    }
}
